package com.rs.department.action;

import java.util.List;

import com.opensymphony.xwork2.ActionSupport;
import com.rs.common.entity.FenYe;
import com.rs.common.entity.HrDepartment;
import com.rs.department.biz.HrDepartmentBiz;

public class HrDepartmentAction extends ActionSupport {

	/*
	 * ×÷Õß£º ÍõÔË·¢
	 * Ê±¼ä£º 2013-10-30 15:24
	 */
	private HrDepartmentBiz hrDepartmentBiz;
	private HrDepartment   hrDepartment;
	private List<HrDepartment> arr;
	private FenYe fenYe;
	
	
	

	


	public FenYe getFenYe() {
		return fenYe;
	}


	public void setFenYe(FenYe fenYe) {
		this.fenYe = fenYe;
	}


	public List<HrDepartment> getArr() {
		return arr;
	}


	public HrDepartment getHrDepartment() {
		return hrDepartment;
	}


	public void setHrDepartment(HrDepartment hrDepartment) {
		this.hrDepartment = hrDepartment;
	}


	public void setHrDepartmentBiz(HrDepartmentBiz hrDepartmentBiz) {
		this.hrDepartmentBiz = hrDepartmentBiz;
	}
	public String add(){
		try {
			hrDepartmentBiz.addHrDepartment(hrDepartment);
			return SUCCESS;
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
			return ERROR;
		}
	}
	public String update(){
		try {
			
			return SUCCESS;
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
			return ERROR;
		}
	}
	public String delete(){
		try {
			
			return SUCCESS;
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
			return ERROR;
		}
	}
	public  String list(){
     try {
    	 arr=hrDepartmentBiz.getAllHrDepartment(fenYe);
			return SUCCESS;
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
			return ERROR;
		}
	}
	
}
